package com.asw.springboot.common;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by hxq on 2017/5/22.
 * 自定义配置属性文件，自定义加载
 * 相当于spring的ioc 初始化bean
 */
@Component
@PropertySource("classpath:asw/asw.properties")
@ConfigurationProperties(
        prefix = "com.asw.company"
)
public class AswCustomProperties {

    private String name;

    private String location;

    private String mobile;

    private String employCount;

    private List<String> employs;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmployCount() {
        return employCount;
    }

    public void setEmployCount(String employCount) {
        this.employCount = employCount;
    }

    public List<String> getEmploys() {
        return employs;
    }

    public void setEmploys(List<String> employs) {
        this.employs = employs;
    }


    @Override
    public String toString() {
        return "AswCustomProperties{" +
                "name='" + name + '\'' +
                ", location='" + location + '\'' +
                ", mobile='" + mobile + '\'' +
                ", employCount='" + employCount + '\'' +
                ", employs=" + employs +
                '}';
    }
}
